/**
 * Main - this is where all the magic happens!
 * essential classes like the map, players, turn manager, UI interface are created here
 * @author 12817152
 */

package main;
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;

import javax.swing.JFrame;

public class Main {
	static BasicMap bm = new BasicMap(27,21); //map is hardcoded for now
	static MapPanel mp;
	static MapStatusBar msb;
	static TurnManager turnMgr;
	static Player p1 = new Player(new City(17,19), new ColonyArray(),  bm); //friendly (self)
	static Player p2 = new Player(new City(1,0), new ColonyArray(),  new Color(0, 0, 200), bm); //enemy

	/**
	 * main method creates players and initalizes all initially required UI elemnts
	 * @param args
	 */
	public static void main(String args[]) {
		p1.setName("David [RED]");
		p2.setName("Goliath [BLUE]");
		
		mp = new MapPanel(bm.getMap()); //get the map panel
		turnMgr = new TurnManager(p1, p2, mp);
		msb = new MapStatusBar(turnMgr);
		MapFrame mf = new MapFrame("Society in a Box", bm, p1, p2, turnMgr, mp, msb);
	}
}
